/*
 * @Author: chenchao
 * @Date: 2022-08-02 22:32:58
 * @LastEditors: chenchao
 * @LastEditTime: 2022-08-06 20:32:13
 * @Description: 
 */

const { defineConfig } = require('@vue/cli-service')
const { VantResolver } = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');

module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver()],
      }),
    ],
  },
  devServer: {
    port: 8806,
    open: false,
    // overlay: {
    //   warnings: false,
    //   errors: true
    // },    代理
    // before: require('./mock/mock-server.js')
    proxy: {
      '/api': {
        target: 'http://47.101.161.186:8080/suier-store',

        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
})
